<? $rest_url = CHtml::normalizeUrl(array('menu/index','rest'=>$rest->id)); ?>
<div class="rest-block">
	<a
		style="background: url('<?=$rest->img?>') no-repeat center center;"
		href="<?=$rest_url?>" class="rest-logo"></a>
	<a href="<?=$rest_url?>" class="rest-title"><?=$rest->name?></a>
	<div class="rest-cats"><?=$rest->title?></div>
	<div class="rest-delivery-time">
		<b><?=$rest->minimal_order?></b> тг.
	</div>
	<div class="rest-delivery-time-info">Минимальный заказ</div>
	<div class="place-for-delivery-price">
		<div data-id="20967" class="rest-delivery-time delivery-calc-position delivery_price">
			<? if( $rest->delivery == 0 ): ?>
				<b class="font-size-20">бесплатно</b>
			<? else: ?>
				<b><?=$rest->delivery?></b> тг.
			<? endif; ?>
		</div>
		<div class="rest-delivery-time-info delivery-calc-position">Стоимость доставки</div>
	</div>
	<a href="<?=$rest_url?>">
		<div class="rest-delivery-time mood-bar-position">
			<div class="black"><?=count($rest->reviews)?> отзывов</div>
			<div class="mood-bar-parent">
				<div style="width: 83%;" class="mood-bar like"></div>
				<div style="width: 17%;" class="mood-bar dislike"></div>
			</div>
			<div class="mood-smiles-parent">
				<div class="positive">
					<img align="left" src="/files/uploads/images/profile/smile_win_small.png"><?=rand(0,30)?></div>
				<div class="negative">
					<img align="left" src="/files/uploads/images/profile/smile_fail_small.png"><?=rand(0,30)?></div>
			</div>
		</div>
	</a>
	<div class="rest-bottom-line"></div>
	<div class="rest-info">
		<span>Бонус за заказ 2%</span>
		Бесплатная доставка по Алматы.
	</div>
	<div class="rest-open-time">
		<i class="clock-icon"></i>
		<? $work_time = explode('-',$rest->time_work); ?>
		<? if( is_array( $work_time ) && isset($work_time[0],$work_time[1]) && $work_time[0] == $work_time[1] ): ?>
			Круглосуточно
		<? else: ?>
			<?=$rest->time_work?>
		<? endif; ?>
	</div>
	<div class="rest-open">Открыто</div>
	<a href="<?=$rest_url?>" class="rest-menu btn btn-foodda-green-middle-menu">К МЕНЮ <i class="rarr_sign"></i></a>
</div>